URL = "http://sourceforge.net/projects/giflib/files/giflib-4.x/giflib-4.1.6/giflib-4.1.6.tar.bz2"
VERSIONS = ["4.1.6"]
DEFAULT_VERSION = "4.1.6"

from source.builders import CMakeBuilder, ConfigureMakeBuilder
import sys

class GIFBuilder( CMakeBuilder ):
  """ subclass of CMakeBuilder with custom configure step """

  def configure(self):
    """upgrade the files and build the solution """
    self.copyfile(sys.path[0]+"/library/additions/giflib/CMakelists.txt", self.extractedpath)
    CMakeBuilder.configure(self)
 
  #def make_devenv(self):
  #  self.debug=False; CMakeBuilder.make_devenv(self)
  #  self.debug=True; CMakeBuilder.make_devenv(self)
    
def decider( machine, dirs ):
  """ build png for the machine in dirs """
  if machine.isWindows():
    return GIFBuilder 
  else:
    return ConfigureMakeBuilder

BUILDER = decider
